<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function isRunNian(year){
        if(year%400||(year%4==0&&year%100!=0)){
            return true;
        }
        return false
    }

    function getSumDay(year,month,day){
        let arr=[31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
        let sum=0;
        if(isRunNian(year)){
            arr[1]=29;
        }
        for(let i=0;i<month-1;i++){
            sum+=arr[i];
        }
        sum+=day;
        return sum;
    }
    let year=Number(prompt('请输入年'))
    let month=Number(prompt('请输入月'))
    let day=Number(prompt('请输入日'))

    console.log(getSumDay(year,month,day));

</script>